cmake_minimum_required( VERSION 3.10 FATAL_ERROR )

if (${FG_ENABLE_GLSLANG})
	file( GLOB_RECURSE SOURCES "*.*" )
	if (DEFINED ANDROID)
		add_library( "Tests.GLSLTrace" SHARED ${SOURCES} )
	else()
		add_executable( "Tests.GLSLTrace" ${SOURCES} )
	endif()
	source_group( TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${SOURCES} )
	set_property( TARGET "Tests.GLSLTrace" PROPERTY FOLDER "Tests" )
	target_link_libraries( "Tests.GLSLTrace" "GLSLTrace" )
	target_link_libraries( "Tests.GLSLTrace" "Framework" )
	#target_link_libraries( "Tests.GLSLTrace" "SPIRV-Cross-lib" )
	target_compile_definitions( "Tests.GLSLTrace" PUBLIC "FG_DATA_PATH=R\"(${CMAKE_CURRENT_SOURCE_DIR}/ref/)\"" )
	
	if (NOT FG_CI_BUILD)
		add_test( NAME "Tests.GLSLTrace" COMMAND "Tests.GLSLTrace" )
	endif ()
endif ()
